package com.avecsys.quotemanager.pojos;

import java.util.HashSet;
import java.util.Set;

/**
 * @author sam sundar
 */
public class SupplierMasterPojo extends BasePojo implements java.io.Serializable
{

	private Long supplierId;

	private CompanyMasterPojo companyMasterPojo = new CompanyMasterPojo();

	private String contactPerson;

	private Set<SupplierUsersPojo> supplierUsers = new HashSet<SupplierUsersPojo>(0);

	private Set<BuyerMasterPojo> supplierBuyers = new HashSet<BuyerMasterPojo>(0);

	private Set<QuoteTemplateMasterPojo> supplierQuoteTemplates = new HashSet<QuoteTemplateMasterPojo>(0);

	private Set<QuoteTransactionPojo> supplierQuoteTransactionSet = new HashSet<QuoteTransactionPojo>(0);

	/**
	 * Default Constructor
	 */
	public SupplierMasterPojo()
	{}

	public CompanyMasterPojo getCompanyMasterPojo()
	{
		return companyMasterPojo;
	}

	/**
	 * @return the contactPerson
	 */
	public String getContactPerson()
	{
		return contactPerson;
	}

	@Override
	public String getPkColumnName()
	{
		return "supplierId";
	}

	public Set<BuyerMasterPojo> getSupplierBuyers()
	{
		return supplierBuyers;
	}

	/**
	 * @return the supplierId
	 */
	public Long getSupplierId()
	{
		return supplierId;
	}

	/**
	 * @return the supplierQuoteTemplates
	 */
	public Set<QuoteTemplateMasterPojo> getSupplierQuoteTemplates()
	{
		return supplierQuoteTemplates;
	}

	/**
	 * @return the supplierQuoteTransactionSet
	 */
	public Set<QuoteTransactionPojo> getSupplierQuoteTransactionSet()
	{
		return supplierQuoteTransactionSet;
	}

	/**
	 * @return the supplierUsers
	 */
	public Set<SupplierUsersPojo> getSupplierUsers()
	{
		return supplierUsers;
	}

	@Override
	public boolean isPersisted()
	{
		if (supplierId == null || supplierId.intValue() == 0)
		{
			return false;
		}
		else
		{
			return true;
		}
	}

	public void setCompanyMasterPojo(CompanyMasterPojo companyMasterPojo)
	{
		this.companyMasterPojo = companyMasterPojo;
	}

	/**
	 * @param contactPerson the contactPerson to set
	 */
	public void setContactPerson(String contactPerson)
	{
		this.contactPerson = contactPerson;
	}

	public void setSupplierBuyers(Set<BuyerMasterPojo> supplierBuyers)
	{
		this.supplierBuyers = supplierBuyers;
	}

	/**
	 * @param supplierId the supplierId to set
	 */
	public void setSupplierId(Long supplierId)
	{
		this.supplierId = supplierId;
	}

	/**
	 * @param supplierQuoteTemplates the supplierQuoteTemplates to set
	 */
	public void setSupplierQuoteTemplates(Set<QuoteTemplateMasterPojo> supplierQuoteTemplates)
	{
		this.supplierQuoteTemplates = supplierQuoteTemplates;
	}

	/**
	 * @param supplierQuoteTransactionSet the supplierQuoteTransactionSet to set
	 */
	public void setSupplierQuoteTransactionSet(Set<QuoteTransactionPojo> supplierQuoteTransactionSet)
	{
		this.supplierQuoteTransactionSet = supplierQuoteTransactionSet;
	}

	/**
	 * @param supplierUsers the supplierUsers to set
	 */
	public void setSupplierUsers(Set<SupplierUsersPojo> supplierUsers)
	{
		this.supplierUsers = supplierUsers;
	}

}
